package com.whfc.fmam.entity.enums;

/**
 * @Description: 磅单类型(1 - 收料 2 - 发料 ， 3 - 直入直出)
 * @author: liakng
 * @version: 1.0
 * @date: 2019/7/23 8:43
 */
public enum WeightNoteType {

    RECEIVED(1, "收料"),

    SEND(2, "发料"),

    INSTANT(3, "直入直出");

    private Integer value;

    private String desc;

    WeightNoteType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static WeightNoteType parseValue(Integer value) {
        switch (value) {
            case 1:
                return RECEIVED;
            case 2:
                return SEND;
            case 3:
                return INSTANT;
            default:
                return null;
        }
    }
}
